home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
001-100
/
001-025
/
020
/
pack
/
poster
< prev
next >
Wrap
Text File
|
1995-03-17
|
3KB
|
93 lines
Article 1451 of net.micro.amiga:
Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site unisoft.UUCP
Path: unisoft!lll-lcc!lll-crg!styx!lognet2!seismo!caip!daemon
From: daemon@caip.UUCP
Newsgroups: net.micro.amiga
Subject: getting the most out of your C disks
Message-ID: <1902@caip.RUTGERS.EDU>
Date: 16 Apr 86 23:32:22 GMT
Date-Received: 18 Apr 86 11:38:27 GMT
Sender: daemon@caip.RUTGERS.EDU
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 1331
From: "DICKSON, JEFF S." <jdickson@jpl-milvax.arpa>
From: 26-JUL-**** 15:12
To:
Subj:
Back in November '85, someone posted a message to the effect
that they had run their Lattice 'C' include files through some kind
of text filter and freed up a sizable amount of disk space for other
things.[:-)]
Well to make a long story short, that person never did make
the "fabulous filter" available to us netters [:-(]. So when I pur-
chased my Lattice 'C' compiler, I decided to write my own text filter.
What the text filter, presented here, does to a 'C' or header
file is quite straight-forward. It basically removes all the un-
neccesary white-space characters (newlines, spaces, tabs, etc) and
comments. For some 'C' and header files, this can mean a substantial
reduction in the file's size - thus freeing up more space for your
stuff.
While lots of comments in any 'C' or header file are a def-
inite plus, after you've printed them out for your own personal ref-
erence - there really is no need "waste the space" on them. And let
me tell you... there are some pretty hefty include files on the
Lattice 'C' disk.
This program will enable you to reclaim about 17 percent of
the space the Lattice 'C' include files currently use up. This works
out to be around 146,432 bytes or 286 blocks.
The command format for "pack" is as follows:
pack [-p<pathname prefix string>] <file spec> [etc...]
The "-p" option is used to specify the directory the filename(s)
on the command line reside in. This is only required if you are not
already logged into that directory.
So, inorder to "pack" all the include files on your Lattice 'C'
disk...you would type:
pack -pcdisk:include/ clib/*.h libraries/*.h workbench/*.h
exec/*.h graphics/*.h intuition/*.h resources/*.h lattice/*.h
hardware/*.h devices/*.h
(note: my Lattice 'C' disk is named "cdisk")
Once started, the program will sequentially tell you which file
is currently being packed and the number of bytes that were deleted.
When the program is finished, the total number of bytes freed is displayed.
This is approximately the number of bytes you now have at your disposal
(+/- 511).
The program was written to make use of the wild card expansion
routines contained in Rick Schaeffer's unix style directory utility, "wildls"
-- that was posted to the net some time ago. For the sake of completeness
and brevity, I have chosen only to included the modules from his source that
are of interest here. If you want the whole thing, it's probably available at
one of the anonymous ftp sites.
Here are the steps for compiling and linking "pack":
cd cdisk:
cc1: -iinclude/ ram:pack
cc2: ram:pack
link: from lib/c.o+ram:pack.o+wildexp.o library lib/lc.lib+
lib/amiga.lib to ram:pack
I recommend compiling and linking the program in ram: as it
hastens the whole process.
One more thing, everything compiles, links, and runs just fine
using Lattice's 'C' compiler version 3.03. Have fun!
ARPA: JDICKSON@JPL-MILVAX
COMPUSERVE: [76657,630]